package com.zzy.test.controller;

import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Lucas-zhang
 * @description TODO
 * @date 2022-03-20 16:08
 */
@RestController
public class UserController {

    @GetMapping("/user")
    public String hello(Authentication authentication) {
        return authentication.getName();
    }
}
